import skRequest from '../request'

// 登录接口
export default function postLoginByAccount(name: string, password: string) {
  return skRequest.post({
    url: '/login',
    data: {
      name,
      password
    }
  })
}

// 获取角色信息接口
export function getUserById(id: number) {
  return skRequest.get({
    url: `/users/${id}`
  })
}

// 获取角色的菜单信息
export function getRoleMenus(id: number) {
  return skRequest.get({
    url: `/role/${id}/menu`
  })
}
